home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / ObjectOutput.java < prev    next >
Text File  |  1998-09-22  |  3KB  |  86 lines

  1. /*
  2.  * @(#)ObjectOutput.java    1.7 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.io;
  16.  
  17. /**
  18.  * ObjectOutput extends the DataOutput interface to include writing of objects.
  19.  * DataOutput includes methods for output of primitive types, ObjectOutput
  20.  * extends that interface to include objects, arrays, and Strings.
  21.  *
  22.  * @author  unascribed
  23.  * @version 1.7, 07/01/98
  24.  * @see java.io.InputStream
  25.  * @see java.io.ObjectOutputStream
  26.  * @see java.io.ObjectInputStream
  27.  * @since   JDK1.1
  28.  */
  29. public interface ObjectOutput extends DataOutput {
  30.     /**
  31.      * Write an object to the underlying storage or stream.  The
  32.      * class that implements this interface defines how the object is
  33.      * written.
  34.      *
  35.      * @exception IOException Any of the usual Input/Output related exceptions.
  36.      * @since     JDK1.1
  37.      */
  38.     public void writeObject(Object obj)
  39.       throws IOException;
  40.  
  41.     /**
  42.      * Writes a byte. This method will block until the byte is actually
  43.      * written.
  44.      * @param b    the byte
  45.      * @exception IOException If an I/O error has occurred.
  46.      * @since     JDK1.1
  47.      */
  48.     public void write(int b) throws IOException;
  49.  
  50.     /**
  51.      * Writes an array of bytes. This method will block until the bytes
  52.      * are actually written.
  53.      * @param b    the data to be written
  54.      * @exception IOException If an I/O error has occurred.
  55.      * @since     JDK1.1
  56.      */
  57.     public void write(byte b[]) throws IOException;
  58.  
  59.     /**
  60.      * Writes a sub array of bytes. 
  61.      * @param b    the data to be written
  62.      * @param off    the start offset in the data
  63.      * @param len    the number of bytes that are written
  64.      * @exception IOException If an I/O error has occurred.
  65.      * @since     JDK1.1
  66.      */
  67.     public void write(byte b[], int off, int len) throws IOException;
  68.  
  69.     /**
  70.      * Flushes the stream. This will write any buffered
  71.      * output bytes.
  72.      * @exception IOException If an I/O error has occurred.
  73.      * @since     JDK1.1
  74.      */
  75.     public void flush() throws IOException;
  76.  
  77.     /**
  78.      * Closes the stream. This method must be called
  79.      * to release any resources associated with the
  80.      * stream.
  81.      * @exception IOException If an I/O error has occurred.
  82.      * @since     JDK1.1
  83.      */
  84.     public void close() throws IOException;
  85. }
  86.